import random
pc = random.choice(['S', 'J', "B"])
print(pc)
pen = input('input(S/J/B): ')
# if str(pc) == str(pen):
#     print('ping ju')
# elif pc == 'S' and pen == 'J':
#     print("pc success")
# elif pc == 'S' and pen == 'B':
#     print('pen success')
# elif pc == 'J' and pen == 'B':
#     print('pc success')
# elif pc == 'J' and pen == 'S':
#     print('pen success')
# elif pc == 'B' and pen == 'S':
#     print('pc success')
# elif pc == 'B' and pen == 'J':
#     print('pen success')
# else:
#     print('input error')

pc_win = [['S', 'J'], ['J', 'B'], ['B', 'S']]
if pc == pen:
    print('ping ju')
elif [pc, pen] in pc_win:
    print('pc success')
else:
    print('pen success')